package com.by.feign.client;

import com.by.common.core.bean.ResultBean;

import com.by.feign.dto.CarDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "car-service")
public interface CarRemoteClient {
    /**
     * 查询购物车中已选中的商品信息
     * @param userId
     * @return
     */
    @GetMapping("/fegin/car")
    ResultBean<List<CarDto>> querySelectGoodsFromCar(@RequestParam("userId") int userId);

    /**
     * 订单生成后 清除已生成订单的商品
     * @param userId
     * @return
     */
    @PutMapping("/feign/car")
    ResultBean cleanCar(@RequestParam("userId") int userId);

}
